package com.manage.common.exception;

import com.manage.common.ResponseEnum;
import lombok.Getter;

@Getter
public class HxException extends RuntimeException {
    private int code;
    private String msg;
    private Object object;

    public HxException(String msg) {
        super(msg);
        this.code = ResponseEnum.FAIL.code();
    }

    public HxException(ResponseEnum responseEnum) {
        super(responseEnum.message());
        this.code = responseEnum.code();
    }

    public HxException(ResponseEnum responseEnum, String msg) {
        super(msg);
        this.code = responseEnum.code();
    }

    public HxException(String msg, Object object) {
        super(msg);
        this.code = ResponseEnum.FAIL.code();
        this.object = object;
    }
}
